<body>
    <div id="app">
        <input type="button" v-on:click="clickone" value="第一题目">
        <input type="button" v-on:click="clicktwo" value="第二题目">
        {{message}}
    </div>
    <script src="vue.js"></script>
    <script>
        var app=new Vue({
            el:"#app",
            data:{
                message:""
            },
            created() {
                this.message='你的好爸爸'
            },
            methods: {
                clickone(){
                    let cc=[1,2,3,4]
                    var pf=cc.map(x=>x*x)
                    console.log(pf)
                },
                clicktwo(){
                    let cc=[1,2,3,4]
                    cc.forEach(function(i,j){
                        console.log(i)
                        console.log(j)
                    })

                    console.log("###############")
                    cc.forEach((a,b)=>{
                        console.log(a)
                        console.log(b)
                    })
                }
            },
        })
    </script>
</body>
